import service from '@/utils/request'

// @Tags HealthQAndA
// @Summary 创建健康问答表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.HealthQAndA true "创建健康问答表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /QuestionAndAnswer/createHealthQAndA [post]
export const createHealthQAndA = (data) => {
  return service({
    url: '/QuestionAndAnswer/createHealthQAndA',
    method: 'post',
    data
  })
}

// @Tags HealthQAndA
// @Summary 删除健康问答表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.HealthQAndA true "删除健康问答表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /QuestionAndAnswer/deleteHealthQAndA [delete]
export const deleteHealthQAndA = (data) => {
  return service({
    url: '/QuestionAndAnswer/deleteHealthQAndA',
    method: 'delete',
    data
  })
}

// @Tags HealthQAndA
// @Summary 批量删除健康问答表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除健康问答表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /QuestionAndAnswer/deleteHealthQAndA [delete]
export const deleteHealthQAndAByIds = (data) => {
  return service({
    url: '/QuestionAndAnswer/deleteHealthQAndAByIds',
    method: 'delete',
    data
  })
}

// @Tags HealthQAndA
// @Summary 更新健康问答表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.HealthQAndA true "更新健康问答表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /QuestionAndAnswer/updateHealthQAndA [put]
export const updateHealthQAndA = (data) => {
  return service({
    url: '/QuestionAndAnswer/updateHealthQAndA',
    method: 'put',
    data
  })
}

// @Tags HealthQAndA
// @Summary 用id查询健康问答表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.HealthQAndA true "用id查询健康问答表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /QuestionAndAnswer/findHealthQAndA [get]
export const findHealthQAndA = (params) => {
  return service({
    url: '/QuestionAndAnswer/findHealthQAndA',
    method: 'get',
    params
  })
}

// @Tags HealthQAndA
// @Summary 分页获取健康问答表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取健康问答表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /QuestionAndAnswer/getHealthQAndAList [get]
export const getHealthQAndAList = (params) => {
  return service({
    url: '/QuestionAndAnswer/getHealthQAndAList',
    method: 'get',
    params
  })
}
